package views.components
{
	import spark.components.TitleWindow;
	
	public class WindowBase extends TitleWindow
	{
		public function WindowBase()
		{
			super();
		}
		
		override public function move(x:Number, y:Number) : void
		{
			if( x < 0 ) x = 0;
			if( y < 0 ) y = 0;
			if( x + width > this.parent.width ) x = this.parent.width - width;
			if( y + height > this.parent.height ) y = this.parent.height - height;
			
			super.move(x, y);
		}
		
	}
}